{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Variable transformers : BoxCoxTransformer\n",
    "\n",
    "The BoxCoxTransformer() applies the BoxCox transformation to numerical\n",
    "variables.\n",
    "\n",
    "The Box-Cox transformation is defined as:\n",
    "\n",
    "- T(Y)=(Y exp(λ)−1)/λ if λ!=0\n",
    "- log(Y) otherwise\n",
    "\n",
    "where Y is the response variable and λ is the transformation parameter. λ varies,\n",
    "typically from -5 to 5. In the transformation, all values of λ are considered and\n",
    "the optimal value for a given variable is selected.\n",
    "\n",
    "**For this demonstration, we use the Ames House Prices dataset produced by Professor Dean De Cock:**\n",
    "\n",
    "Dean De Cock (2011) Ames, Iowa: Alternative to the Boston Housing\n",
    "Data as an End of Semester Regression Project, Journal of Statistics Education, Vol.19, No. 3\n",
    "\n",
    "http://jse.amstat.org/v19n3/decock.pdf\n",
    "\n",
    "https://www.tandfonline.com/doi/abs/10.1080/10691898.2011.11889627\n",
    "\n",
    "The version of the dataset used in this notebook can be obtained from [Kaggle](https://www.kaggle.com/c/house-prices-advanced-regression-techniques/data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "from feature_engine.imputation import ArbitraryNumberImputer, CategoricalImputer\n",
    "from feature_engine.transformation import BoxCoxTransformer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Id</th>\n",
       "      <th>MSSubClass</th>\n",
       "      <th>MSZoning</th>\n",
       "      <th>LotFrontage</th>\n",
       "      <th>LotArea</th>\n",
       "      <th>Street</th>\n",
       "      <th>Alley</th>\n",
       "      <th>LotShape</th>\n",
       "      <th>LandContour</th>\n",
       "      <th>Utilities</th>\n",
       "      <th>...</th>\n",
       "      <th>PoolArea</th>\n",
       "      <th>PoolQC</th>\n",
       "      <th>Fence</th>\n",
       "      <th>MiscFeature</th>\n",
       "      <th>MiscVal</th>\n",
       "      <th>MoSold</th>\n",
       "      <th>YrSold</th>\n",
       "      <th>SaleType</th>\n",
       "      <th>SaleCondition</th>\n",
       "      <th>SalePrice</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>65.0</td>\n",
       "      <td>8450</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>208500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>20</td>\n",
       "      <td>RL</td>\n",
       "      <td>80.0</td>\n",
       "      <td>9600</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Reg</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>2007</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>181500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>68.0</td>\n",
       "      <td>11250</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>223500</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>70</td>\n",
       "      <td>RL</td>\n",
       "      <td>60.0</td>\n",
       "      <td>9550</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006</td>\n",
       "      <td>WD</td>\n",
       "      <td>Abnorml</td>\n",
       "      <td>140000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>60</td>\n",
       "      <td>RL</td>\n",
       "      <td>84.0</td>\n",
       "      <td>14260</td>\n",
       "      <td>Pave</td>\n",
       "      <td>NaN</td>\n",
       "      <td>IR1</td>\n",
       "      <td>Lvl</td>\n",
       "      <td>AllPub</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>2008</td>\n",
       "      <td>WD</td>\n",
       "      <td>Normal</td>\n",
       "      <td>250000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 81 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Id  MSSubClass MSZoning  LotFrontage  LotArea Street Alley LotShape  \\\n",
       "0   1          60       RL         65.0     8450   Pave   NaN      Reg   \n",
       "1   2          20       RL         80.0     9600   Pave   NaN      Reg   \n",
       "2   3          60       RL         68.0    11250   Pave   NaN      IR1   \n",
       "3   4          70       RL         60.0     9550   Pave   NaN      IR1   \n",
       "4   5          60       RL         84.0    14260   Pave   NaN      IR1   \n",
       "\n",
       "  LandContour Utilities  ... PoolArea PoolQC Fence MiscFeature MiscVal MoSold  \\\n",
       "0         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      2   \n",
       "1         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      5   \n",
       "2         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      9   \n",
       "3         Lvl    AllPub  ...        0    NaN   NaN         NaN       0      2   \n",
       "4         Lvl    AllPub  ...        0    NaN   NaN         NaN       0     12   \n",
       "\n",
       "  YrSold  SaleType  SaleCondition  SalePrice  \n",
       "0   2008        WD         Normal     208500  \n",
       "1   2007        WD         Normal     181500  \n",
       "2   2008        WD         Normal     223500  \n",
       "3   2006        WD        Abnorml     140000  \n",
       "4   2008        WD         Normal     250000  \n",
       "\n",
       "[5 rows x 81 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#Read data\n",
    "data = pd.read_csv('houseprice.csv')\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((1022, 79), (438, 79))"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's separate into training and testing set\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "    data.drop(['Id', 'SalePrice'], axis=1), data['SalePrice'], test_size=0.3, random_state=0)\n",
    "\n",
    "X_train.shape, X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BoxCoxTransformer(variables=['LotArea', 'GrLivArea'])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's transform 2 variables\n",
    "\n",
    "bct = BoxCoxTransformer(variables = ['LotArea', 'GrLivArea'])\n",
    "\n",
    "# find the optimal lambdas \n",
    "bct.fit(X_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'LotArea': 0.022716974992922984, 'GrLivArea': 0.06854346283829917}"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# these are the exponents for the BoxCox transformation\n",
    "\n",
    "bct.lambda_dict_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# transfor the variables\n",
    "\n",
    "train_t = bct.transform(X_train)\n",
    "test_t = bct.transform(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'GrLivArea')"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEWCAYAAAB/tMx4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9t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tj200xIazUGyXHh9eSi9JlXIIRZIqZYBLUqUMcEmqlAEuSZUywCWpUga4qhERAxFxUUTcExHLI+J7EfEHHdabFy13imwp/1hEHNXDfl4cERkR1d5/RVODAa4qlIuEvg58JzOfn5mH0Fz8Madtva5fE5iZH8rMa3rY3RuAG8rPjnWJCF87mnD+EaoWRwBPZ+ZnRwoy877M/D8RsSgiroiI62guGOooIr4YESdGxDER8ZWW8qGWe1EH8HpgEfDKiJheyueVe01fSHMxztyI+POI+EE09zL/aMv2vl7eIayMiMX9bQZpAwNctTgIuGmU5QcDJ2bmK3rY1jXASyNilzL/P2juxQHwX4F7M/NuYJjmVqcj9gP+ITMPAvYv84cCLwYOiYiXl/XeWt4hDALviog9eqiTtMkMcFUpIv4+mm+4+UEpujoz2+/R3lE2tyL9JvDaMuRyHBvut/EGNoT5Ep49jHJfNvcth+b+LK+iuUT+Jpq7C+5Xlr0rIn4I3Ehzk6X9kMZB1/FCaZJZCfz3kZnMfEdE7AksK0VPbuL2lgDvpPlijmWZ+URETCv7OD4iPkhzr5Y9ImJmh30E8InM/MfWjUbEEHAU8LLM/GVEDNPcw0PqO3vgqsV1wPSIeHtL2c5bsL1v0wy7/DEbetxHArdm5tzMnJeZ+9DcGnejM11o7o741nLvcyJidkQ8l+YWp4+W8D6A5qvTpHFhgKsK2dx17QTgFRFxb0R8n+brtc7o8pT9I+L+lsfr27b3DHAl8OryE5rhkn9u285X6XA2SmZ+i+Z7HL8XEStovuJrJs3QzHYRcQdwNs0wijQuvBuhJFXKHrgkVcoAl6RKGeCSVCkDXJIqZYBLUqUMcEmqlAEuSZX6/7bsZE0ceeJSAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# variable before transformation\n",
    "X_train['GrLivArea'].hist(bins=50)\n",
    "plt.title('Variable before transformation')\n",
    "plt.xlabel('GrLivArea')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'GrLivArea')"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEWCAYAAAB/tMx4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAVqUlEQVR4nO3df7RdZX3n8fdHIvIjEBAwpQEJHRkskpGRu9TqUm+EWgQt2EFHxtGgYNpprUylU7B11drqGuzSUabtrEpLhalCqkiVhaOC6BVthRoQDZA6CoISEbAGNMpUo9/54+zIyeX+OEnuvec8N+/XWmfds5+9zz7f8+TcT577nL33SVUhSWrPY4ZdgCRp5xjgktQoA1ySGmWAS1KjDHBJapQBLkmNMsA1MpIsT3J9ku8neeew6+mXZGWSSrJkAZ7rOUm+MuC2Zyb53AzrJ5KcPXfVaZTM+5tRbUiypW9xH+BfgZ90y79eVe9fgDLWAt8B9q/d+ASFqvoscPSw69DoM8AFQFUt3XY/yV3A2VX1ycnbJVlSVVvnqYwjgNt3Jrznua4Fs1hehxaGUyiaUZLxJPckOS/Jt4H3JjkwydVJHkiyubt/WN9jJpL8SZJ/6KZDrklycLduryTvS/IvSR5M8oVu6uQSYA3we0m2JDkxyeOSvDvJt7rbu5M8boa6/ijJB7v9fz/JhiT/Nskbk9yf5JtJXtBX57IkFye5N8mmJG9Nske3bo8k70jynSR3AqfM0EfnJbliUtuFSf5nd//VSTZ2Nd2Z5Ndn6d/xJPf0bXN+kju6x9+e5CWPLiF/nuShJP+c5IQZan1NV8vmJJ9IcsR022r0GeAaxM8Bj6c3Ql5L733z3m75icDDwJ9Pesx/Al4NPAHYE/jdrn0NsAw4HDgI+A3g4ao6E3g/8KdVtbQb/f8B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JslS6H0VXnelxGXA5i68nww8cxdqlGZkgKsJ3ZcTnAY8L8nXk/wTva8MO2+ahxyd5J6+20sn7e8nwNX0rkd/ddd8Bo/+XtYPMcXRKN23JF0GfD7JBuAKYD96UzNLkmwELqA3jSLNC69GKEmNcgQuSY0ywCWpUQa4JDXKAJekRhngktQoA1ySGmWAS1Kj/j9NRVWgumI25QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# transformed variable\n",
    "train_t['GrLivArea'].hist(bins=50)\n",
    "plt.title('Transformed variable')\n",
    "plt.xlabel('GrLivArea')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'LotArea')"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEWCAYAAACdaNcBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAAAY3UlEQVR4nO3de5RmVXnn8e8jzb2xG2zsabp7KFDUoCBCD8LSmAK8cDGBrIUKg9BNyHRM0NERRxpxRnRI0mYSMS4zKAQG8EJDNAQCGlSg4sIEsFvut9AwhdByEYSGQoiCz/xxdumheN+6dNd19/ez1rvqnL332Wef/b7vr06d91KRmUiS6vKyqR6AJGn8Ge6SVCHDXZIqZLhLUoUMd0mqkOEuSRUy3EVEDETErqNo1xMRGRGzutSfFhFf3cAx9EfE2zdw29dGxE0R8XRE/NcN6WOmiIjfj4gHyn32pqkez1ARcXtE9E71OGS4zzgR8U8R8ZkO5YdHxMPdgnc4mTk7M+8bnxFOiY8D12Tmdpn5hYncUU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gG7DSk7D3AdTRfAtVRRGw2gWOSNorhrk1GROwVEdeVL9K6pHzS8EiaD6B8LZrvPN+6ND8aOAlYGBGLWn0MRMRfRcTNwP4R8f6IuKFs++XBwI+IMyNidfn+8E9P9rFKhrs2JRcAJ2fmnjSfPPxUZn4DWA0ck5l7ZeazEbGY5tOcN9B8j/n7Wn1sS/P93m+k+Q6V9wFvycy9gBeAY0q7UzNzCbAn8DsRseckHJ/0a4a7NgkRMQeYm5n/XIrOp/kHF528jybUAVbx4kszL9B8ARXAQcA+wA8j4qayvmupe29E/Ai4EXg9zT+HkCbNrJGbSJuco4H/EBGDZ+E7RcRumXkP8FxmvlDKAzg/M09pb1y+jOtjwH/KzCci4jya72CRJo1n7tokZOZ64ImI+O1SdCwweBb/NM2/XyMiXgPMzsyFmdmTmT3An9P5hdWrgCMj4pVl2x0iYmfg5cAzwPqImE/zXfzSpPLMXbXaJiLa/x3nczRfufqliNiG5v9fHl/qzivlz9J8Z/4lQ/r6JnAR8Jl2YWbeERGfpPlPWS+j+UbGEzPzuoi4EbiL5j/3/GBcj0waBb8VUpIq5GUZSaqQ4S5JFTLcJalChrskVchwl6QKGe6SVCHDXZIq9P8B4yS+3dnpwE4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# tvariable before transformation\n",
    "X_train['LotArea'].hist(bins=50)\n",
    "plt.title('Variable before transformation')\n",
    "plt.xlabel('LotArea')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 0, 'LotArea')"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEWCAYAAACdaNcBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZ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CsjF3QpJ0nAV6y4uPdOgpJmSfitpQh4yaDYWF3czWEx2aoq8t5CdZOukSneStFsTM5nVxcXdJg1Jr5C0Nnde830kvRnoBS5P5wufmlY/CVgKzJI0O9fGsKSLJP0EeLWkUyT9MN33n0cKvqRLJK1L54D/aKsfq5mLu00mlwFnp/OabyT79uCVwDqyc668IiJ2pHNv7x8RPyT7Vu3bcm1MIzsF8+Fk3/h8G3BUOtf4M2RnLQQ4LyJ6gcOAP5Z0WAsen9l/cXG3SUHSdGBGRHwvzVoFvLbC6m8jK+oAAzx7aOYZ4Cvp9tHAAuBHkjak6T9Iy94q6cdkp7s4FDikAQ/DbNymtDuA2QR0EvBCSSN74QdImhsRdwO/iYiRUy4LWBURz7qykaSDgA8CfxQRj0paCXTUpR2t83nP3SaFiNgOPCrpNWnW28muagXwOLA3gKSXAl0RMSt3Jr+PU/6D1TXAm3Nn7dxX0oHA84AngO2SuoE3NulhmVXkPXcrqr0k3Z+b/jTZqYb/KV1A4R7gnWnZyjR/B/C19JP3FeDLwMfyMyPiDkkfBq6X9Byys3aeHhFrJd1CdmrazcD3G/rIzMbBZ4U0MysgD8uYmRWQi7uZWQG5uJuZFZCLu5lZAbm4m5kVkIu7mVkBubibmRXQfwIi1kPwLHIT7QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# transformed variable\n",
    "train_t['LotArea'].hist(bins=50)\n",
    "plt.title('Variable before transformation')\n",
    "plt.xlabel('LotArea')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Automatically select numerical variables\n",
    "\n",
    "The transformer will transform all numerical variables if no variables are specified."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# load numerical variables only\n",
    "\n",
    "variables = ['LotFrontage', 'LotArea',\n",
    "             '1stFlrSF', 'GrLivArea',\n",
    "             'TotRmsAbvGrd', 'SalePrice']\n",
    "\n",
    "data = pd.read_csv('houseprice.csv', usecols=variables)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((1022, 5), (438, 5))"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's separate into training and testing set\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "    data.drop(['SalePrice'], axis=1), data['SalePrice'], test_size=0.3, random_state=0)\n",
    "\n",
    "X_train.shape, X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Impute missing values\n",
    "\n",
    "arbitrary_imputer = ArbitraryNumberImputer(arbitrary_number=2)\n",
    "\n",
    "arbitrary_imputer.fit(X_train)\n",
    "\n",
    "# impute variables\n",
    "train_t = arbitrary_imputer.transform(X_train)\n",
    "test_t = arbitrary_imputer.transform(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BoxCoxTransformer()"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# let's transform all numerical variables\n",
    "\n",
    "bct = BoxCoxTransformer()\n",
    "\n",
    "bct.fit(train_t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['LotFrontage', 'LotArea', '1stFlrSF', 'GrLivArea', 'TotRmsAbvGrd']"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# variables that will be transformed\n",
    "\n",
    "bct.variables_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "# transform  variables\n",
    "train_t = bct.transform(train_t)\n",
    "test_t = bct.transform(test_t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'LotFrontage': 0.7837538110249009,\n",
       " 'LotArea': 0.022716974992922984,\n",
       " '1stFlrSF': 0.024760203538733927,\n",
       " 'GrLivArea': 0.06854346283829917,\n",
       " 'TotRmsAbvGrd': 0.26841547941861493}"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# learned parameters\n",
    "\n",
    "bct.lambda_dict_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "fenotebook",
   "language": "python",
   "name": "fenotebook"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
